package com.yike.product.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品表
 *
 * @author yike
 * @since 2024-07-17
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "商品列表信息")
public class GoodsListVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("商品条码")
    private String barcode;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("商品图片")
    private String image;

    @ApiModelProperty("商品售价")
    private BigDecimal sellPrice;

    @ApiModelProperty("商品进价")
    private BigDecimal buyPrice;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("商品规格")
    private String specification;

    @ApiModelProperty(value = "生产时间", example = "2020-01-01")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date manufacturerTime;


}
